home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
nihcl-30.lha
/
nihcl-3.0
/
test
/
heap.v
< prev
next >
Wrap
Text File
|
1990-05-19
|
983b
|
205 lines
Testing Heap
100
70
76
22
101
54
60
2
5
601
Test asHeap function
OrderedCltn as Heap:
2
5
22
54
60
70
76
100
101
601
Test isEqual function
SUCCESS
SUCCESS
SUCCESS
b = (1,1)
(1,2)
(1,3)
(1,3)
c = (1,1)
(1,2)
(1,3)
(1,3)
c =
c.removeId(D)->isSame(D): 1
b.first(): (1,1)
b.last(): (1,3)
b = (1,1)
(1,2)
(1,3)
(1,3)
(4,5)
remove min from b (1,1)
remove max from b (4,5)
b= (0,1)
(0,1)
(1,1)
(1,2)
(1,2)
(1,2)
(3,2)
(1,3)
(1,3)
(1,4)
(5,6)
(9,8)
occurrencesOf((1,2)): 3
b.sort(): (0,1)
(0,1)
(1,1)
(1,2)
(1,2)
(1,2)
(3,2)
(1,3)
(1,3)
(1,4)
(5,6)
(9,8)
b.asSet(): (1,1)
(1,4)
(1,3)
(9,8)
(3,2)
(0,1)
(5,6)
(1,2)
Testing remove(Object&)
5
8
10
12
13
14
15
15
16
17
18
20
25
27
28
30
30
31
32
34
36
37
38
39
45
45
50
57
59
65
80
5
8
12
13
14
15
15
16
17
18
20
25
27
28
30
30
31
32
34
36
37
38
39
45
45
50
57
59
65
80
5
8
12
13
14
15
15
16
17
18
20
25
27
28
30
30
31
32
34
36
37
38
39
45
45
50
57
59
65
5
8
12
13
14
15
15
16
17
20
25
27
28
30
30
31
32
34
36
37
38
39
45
45
50
57
59
65